<template>
  <div>
    <section class="title">
      <img
        src="https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2534506313,1688529724&fm=26&gp=0.jpg"
        alt
      />
      <p>15222004751</p>
    </section>
    <section class="content">
      <p>
        <span @click="toMine">我的面试</span>
        <span @click="toMine">></span>
      </p>
      <p>
        <span>客服中心</span>
        <span>></span>
      </p>
      <p>
        <span @click="finger">指纹识别</span>
        <span>></span>
      </p>
    </section>
    <button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">获取手机号</button>
  </div>
</template>
<script>

import {decrypt} from '../../api/user';

export default {
  data() {
    return {};
  },
  methods: {
    toMine() {
      wx.redirectTo({ url: "/pages/list/index" });
    },
    finger() {
      wx.startSoterAuthentication({
        requestAuthModes: ["fingerPrint"],
        challenge: "123456",
        authContent: "请用指纹解锁",
        success(res) {
          wx.showToast({
            title: "指纹认证",
            icon: "success",
            duration: 2000
          });
        }
      });
    },
    async getPhoneNumber(e) {
      let result = await decrypt(e.detail.iv,e.detail.encryptedData);
      console.log(result,'result')
    }
  }
};
</script>

<style lang="scss" scoped>
.title {
  background: #f7f7f8;
  padding: 60rpx 0;
  text-align: center;
  img {
    width: 120rpx;
    height: 120rpx;
    border-radius: 50%;
  }
  p {
    font-size: 30rpx;
    margin-top: 20rpx;
    font-weight: 600;
  }
}
.content {
  p {
    height: 90rpx;
    line-height: 90rpx;
    text-align: right;
    padding: 0 40rpx;
    font-size: 30rpx;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
    color: #666;
    span:nth-child(1) {
      float: left;
    }
    span:nth-child(2) {
      font-size: 36rpx;
    }
  }
}
 button {
    height: 90rpx;
    line-height: 90rpx;
    font-size: 36rpx;
    color: #fff;
    border-radius: 0;
    border: none;
    background: #197dbf;
  }
</style>